<?php

namespace app\api\controller;

use app\common\controller\Api;

class Goods extends Api
{

    protected $noNeedLogin = ['levelList'];
    protected $noNeedRight = ['*'];

    /**1
     * Notes: 兑换页所有商品
     * User: chenLei
     * Date: 8/25/25
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\ModelNotFoundException
     * @throws \think\exception\DbException
     */
    public function levelList()
    {
        $goodsModel = new \app\admin\model\gift\Goods();
        $res = $goodsModel->levelList($this->auth->id);

        if ($res === false) {
            $this->error($goodsModel->getError());
        }

        $this->success('success', $res);
    }

}